home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1998 May / Macworld (1998-05).dmg / Serious Demos / Lasso 2.5 Test Drive / Lasso 2.5 Plug-in / Employees / detail_form.txt < prev    next >
Text File  |  1997-12-12  |  8KB  |  217 lines

  1. <!-- This file is intended to be "included" in other format files. It is not
  2. complete. See the [include] tag in files "detail.html", "update_reply.html" and
  3. "add_reply.html". -->
  4.  
  5. <center>
  6.  
  7. <!-- Setting action="action.lasso" causes the Web server to direct processing to the Lasso Plug-in or Lasso Server. The form action statement demonstrates how to combine the "Post" and "Search" arguments to describe the Lasso action. "-database" and "-layout" indicate which FileMaker Pro database and layout to use; the names are not case sensitive. This method can be used in combination with hidden inputs to specify the elements of other Lasso tags.
  8.  
  9. A record ID is a unique number assigned by FileMaker Pro to identify a record.
  10. -recid is the command tag used to indicate to lasso which record to act upon.
  11. The [recid_value] tag is replaced by Lasso with the actual FileMaker Pro record
  12. ID. The pair "-recid=[recid_value]" indicates to Lasso exactly which record in
  13. the database to perform the action on. "-response" tells Lasso the name of the
  14. template file to use for formatting output. The file name is not case
  15. sensitive, and is required. The file must reside within the same folder as
  16. Lasso or within a sub-folder of the folder that Lasso is in. 
  17.  
  18. The action can be indicated anywhere in the statement, in this case it is
  19. specified at the end. If a different action is used with a "submit" button,
  20. then that action will be used in place of "update." In other words, whichever
  21. is the last action on the form will be the action used, any earlier actions are
  22. ignored.  -->
  23.  
  24. <form
  25. action="action.lasso?-update&-database=Employees.fp3&-layout=Detail&-recid=[recid_value]&-response=update_reply.html"
  26. method="POST">
  27.  
  28.  
  29. <!-- The -deleteReply tag identifies the HTML format file to use when creating
  30. a reply to a Delete command. This tag is required if you include a delete
  31. button on this form; it's optional otherwise. -->
  32.  
  33. <input type="hidden" name="-deleteReply" value="delete_reply.html">
  34.  
  35. <!-- The rest of the input fields contain the data values to use when updating a record. The [field] tag tells Lasso to substitute a field value     from the current record. The field name is a required parameter for the [field] tag. Field names are not case sensitive. The [field] tag may also be used in anchor and image tags. There are some examples here and in the file "hitlist_format.html".
  36.  
  37. [record] and [/record] tags are optional if only one record is being displayed. -->
  38.  
  39. [if: field:"image_present"=="Y"]
  40. <img src="[image: Photo,jpeg]" align=left>[/if]
  41.  
  42. <a
  43. href="action.lasso?-database=Employees.fp3&-layout=detail&-response=expenses.lasso&-recid=[recid_value]&-search">
  44. <font size="+1">View Expense Report</font></a>
  45.  
  46. <!-- The [math-add:  ...] tag is used to increment a field by one, each time the record is displayed on a detail page. The value of the number field "visitcount" is returned to the [math-add:  ...] tag to add one to the value, and then the inline adds the incremented value back to the database. The database_name and layout_name tags simply use whatever database and layout was used to get to the detail page. Note that a conditional statement so that the inline action only occurs when the last action is search. -->
  47.  
  48. <P>[if: lasso_action=="search"]
  49. [inline: update, database=database_name, layout=layout_name, visitcount=(math-add:field:"visitcount",1), recid=recid_value]
  50. This record has been visited <b>[math-add: field:"visitcount", 1]</b> times.
  51. [/inline][/if]
  52.  
  53. <P><table>
  54.  
  55.     
  56. <tr>
  57.     <td bgcolor=#d7bf89>First Name:</td>
  58. <td><input type=text size=30 name="First Name" value="[field:"First Name"]"></td>
  59. </tr>
  60. <tr>
  61. <td bgcolor=#d7bf89>Last Name:</td> 
  62. <td><input type=text size=30 name="Last Name" value="[field:"Last Name"]"></td>
  63. </tr>
  64. <tr>
  65.     <td bgcolor=#d7bf89>Social Security Number:</td>
  66.     <td bgcolor=#ffffff>[field: "Social Security Number"]</td>
  67. </tr>
  68. <tr>
  69.     <td bgcolor=#d7bf89>Employee Number:</td>
  70.     <td bgcolor=#ffffff>[field: "Employee Number"]</td>
  71. </tr>
  72. <tr>
  73.     <td bgcolor=#d7bf89>Street:</td>
  74.     <td><input type=text size=30 name="Street" value="[field: "Street"]"></td>
  75. </tr>
  76. <tr>
  77.     <td bgcolor=#d7bf89>City:</td>
  78.     <td><input type=text size=30 name="City" value="[field: "City"]"></td>
  79. </tr>
  80. <tr>
  81.     <td bgcolor=#d7bf89>State:</td>
  82.     <td><input type=text size=5 name="State" value="[field: "State"]"></td>
  83. </tr>
  84. <tr>
  85.     <td bgcolor=#d7bf89>Zip code:</td>
  86.     <td><input type=text size=30 name="Zip" value="[field: "Zip"]"></td>
  87. </tr>
  88. <tr>
  89.     <td bgcolor=#d7bf89>Home Phone:</td>
  90.     <td><input type=text size=30 name="Home Phone" value="[field:"Home Phone"]"></td>
  91. </tr>
  92.  
  93. <tr>
  94.     <td bgcolor=#d7bf89>E-mail:</td>
  95.     <td><input type=text size=30 name="Email" value="[field: "Email"]"></td>
  96. </tr>
  97. <tr>
  98.     <td bgcolor=#d7bf89>Home Page:</td>
  99.     <td><input type=text size=30 name="Home Page" value="[field: "Home Page"]"></td>
  100. </tr>
  101. <tr>
  102.  
  103. <!-- The [option: Field Name] tag can be used to format fields that contain
  104. value lists as HTML pop-up/pull-down menus. Lasso will substitute HTML, for
  105. every value in the value list, in the form:
  106.  
  107. "<option>List Value" 
  108.  
  109. or 
  110.  
  111. "<option selected>List Value" (if an item was previously selected).  -->     
  112.  
  113.     <td bgcolor=#d7bf89>Group:</td>
  114.     <td><select name="Group">[option: "Group"]</select> </td>
  115. </tr>
  116.  
  117. <tr>
  118.  
  119. <!-- The [value_list: Field Name"] tag can be used to format fields that contain
  120. value lists as a set of radio buttons or checkboxes. All HTML between the
  121. [value_list: "Field Name] and [/value_list] tags is repeated for every value in
  122. the value list. The actual list value is substitued for the [list_value] tag.
  123.  
  124. The [checked] tag tells Lasso to place the HTML CHECKED parameter into the
  125. output file if the list value is present in the database. The [checked] tag is
  126. only valid with [value_list] tags. -->
  127.  
  128.     <td bgcolor=#d7bf89>Shift:</td>
  129.     <td>[value_list: "Shift"]
  130.             <input type="radio" name="Shift" value="[list_value]" [checked]>[list_value]
  131.         [/value_list]
  132.     </td>
  133. </tr>
  134.     
  135. <tr>     
  136.     <td bgcolor=#d7bf89>Next Month Shift:</td>
  137.     <td>[value_list: "Next Month Shift"]
  138.             <input type="radio" name="Next Month Shift" value="[list_value]"
  139. [checked]>[list_value]
  140.         [/value_list]
  141.     </td>
  142. </tr>
  143. <tr>
  144.     <td bgcolor=#d7bf89>Nice Traits:</td>
  145.     <td>[value_list: "Nice Traits"]
  146.             <input type="checkbox" name="Nice Traits" value="[list_value]"
  147. [checked]>[list_value]
  148.         [/value_list]
  149.  
  150. <!-- The hidden input is here to allow the user to "uncheck" all values
  151. for "Nice Traits" and have them deleted in the database.It is only needed with checkboxes or scrolling lists that appear on update forms. -->
  152.  
  153.         <input type="hidden" name="Nice Traits" value="">
  154.     </td>
  155. </tr>
  156.  
  157.  
  158. <tr>
  159.     <td valign="top" bgcolor=#d7bf89>Comments:</td>
  160.     <td><textarea name="Comments" rows=4 cols=40 wrap>[field: "Comments"]</textarea></td>
  161. </tr>
  162. <tr>
  163.     <td bgcolor=#d7bf89>Favorite Colored Dot:</td>
  164.     <td>[value_list: "Favorite Colored Dot"]
  165.             <input type="radio" name="Favorite Colored Dot" value="[list_value]"
  166. [checked]>
  167.             <img src="[list_value]">
  168.         [/value_list]
  169.     </td>
  170. </tr>
  171. <tr>
  172.     <td bgcolor=#d7bf89>Date Last Modified:</td>
  173.     <td bgcolor=#ffffff>[field: "Edit Date"]</td>
  174. <tr>
  175.     <td bgcolor=#d7bf89>Time Last Modified:</td>
  176.     <td bgcolor=#ffffff>[field:"Edit Time"]</td>
  177. <tr>
  178. </table>
  179. <p>
  180.  
  181.     <!-- The name of the update button must be "-update"; value can be 
  182.     anything. Specifying the "update" action here is redundant, but will not 
  183.     disturb anything -->
  184.  
  185. <input type="Submit" name="-update" value="Update Record">
  186.  
  187.     <!-- The name of the delete button must be "-delete"; value can be     
  188.     anything. -->
  189.     
  190.  
  191. <input type="Submit" name="-delete" value="Delete Record" onClick="return
  192. confirmDelete()">
  193.  
  194.     <!-- The button named "-duplicate" will cause a new record to be added 
  195.     that is an exact duplicate of the one being displayed. The name must be 
  196.     "-duplicate"; the value can be anything. As mentioned earlier, if the     
  197.     delete or duplicate button is selected  -->
  198.  
  199. <input type="Submit" name="-duplicate" value="Duplicate Record">
  200.  
  201.     <!-- The reset button has no effect on Lasso, it merely clears the current 
  202.     form. Reset does not change field information stored in the FileMaker Pro 
  203.     database. -->
  204.  
  205. <p>
  206. <input type="Reset" value="Reset Values">
  207.  
  208.  
  209. </form>
  210.  
  211. </center>
  212.  
  213.     <!-- The [include] tag instructs Lasso to parse and insert the output HTML 
  214.     from the specified format file into the HTML for this format file. -->     
  215.      
  216. [include:"footer.txt"]
  217.